package com.example.chatweb.mapper;

import com.example.chatweb.entity.EntityRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author LENOVO
* @description 针对表【entity_relation(实体关系表)】的数据库操作Mapper
* @createDate 2024-05-29 16:31:55
* @Entity com.example.chatweb.entity.EntityRelation
*/
public interface EntityRelationMapper extends BaseMapper<EntityRelation> {
    @Select("SELECT * FROM entity_relation WHERE label IN (SELECT distinct label FROM tag)")
    List<EntityRelation> getDistinctEntitiesByTags();

}




